package com.naiterui.ehp.bp.support.utils;

import java.util.HashMap;
import java.util.Map;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author gaoliangliang
 * @date 2019-07-11 12:37
 * @since 1.0.0
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class JwtUser {

    public static final int USER_TYPE_DOCTOR = 1;
    public static final int USER_TYPE_PATIENT = 2;
    public static final int USER_TYPE_DEPUTY = 3;

    private Long userId;
    private Integer userType;

    public Map<String, String> claims() {
        return new HashMap<String, String>() {{
            this.put("userId", userId.toString());
            this.put("userType", userType.toString());
        }};
    }
}
